let shop = {
    "id":null,
    "images":null,
    "title":null,
    "summery":null,
    "sell":0,
    "stoptime":null,
    "shopdetail":null,
    "address": null,
    "phone": null
};
$(function () {
    let vue = new Vue({
        el:"#app",
        data:{
            shop:shop
        },
        methods:{
            addOrder:function (cId) {
                $.ajax({
                    url: '/service/order?cId='+cId,
                    type: 'get',
                    dataType: 'json',
                    success:function (result) {
                        layer.msg("预约成功，请及时赴约");
                    }
                });
            }
        }
    });
});

//获取店铺信息
$.ajax({
   url:"/service/shopInfo",
   type:'post',
   dataType:'json',
   success:function (result) {
        shop.id=result.cid;
        shop.image=result.cimages;
        shop.title=result.ctitle;
        shop.summery=result.csummery;
        shop.sell=result.csell;
        shop.stoptime=result.stopTime;
        shop.shopdetail=result.cdetail;
        shop.address=result.mechanism.maddress;
        shop.phone=result.mechanism.mphone;
   }
});